document.domain = '127.0.0.1'

export default ({ store }) => {
  window.addEventListener('message', (event) => {
    if (event.origin === 'http://127.0.0.1:3001') {
      store.commit('home/UPDATE_DATA', event.data)
    }
  })
}
